<%--
  Created by IntelliJ IDEA.
  User: TR
  Date: 2020/9/23
  Time: 21:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@page isELIgnored="false" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
    <title>易买网 - 首页</title>
    <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css" />
    <script type="text/javascript" src="${pageContext.request.contextPath}/scripts/function.js"></script>
</head>
<body>
<div id="header" class="wrap">
    <div id="logo"><img src="${pageContext.request.contextPath}/images/logo.gif" /></div>
    <div class="help"><a href="${pageContext.request.contextPath}/product/addCar" class="shopping">购物车</a>
        <a href="${pageContext.request.contextPath}/login/to_login">登录</a>
        <a href="${pageContext.request.contextPath}/register/re">注册</a>
        <a href="${pageContext.request.contextPath}/comment/front/list">留言</a></div>
    <div class="navbar">
        <ul class="clearfix">
            <li class="current"><a href="${pageContext.request.contextPath}/index/front">首页</a></li>
            <li><a href="#">图书</a></li>
            <li><a href="#">百货</a></li>
            <li><a href="#">品牌</a></li>
            <li><a href="#">促销</a></li>
        </ul>
    </div>
</div>
<div id="childNav">
    <div class="wrap">
        <ul class="clearfix">
            <li class="first"><a href="#">音乐</a></li>
            <li><a href="#">影视</a></li>
            <li><a href="#">少儿</a></li>
            <li><a href="#">动漫</a></li>
            <li><a href="#">小说</a></li>
            <li><a href="#">外语</a></li>
            <li><a href="#">数码相机</a></li>
            <li><a href="#">笔记本</a></li>
            <li class="last"><a href="#">Investor Relations</a></li>
        </ul>
    </div>
</div>
<div id="position" class="wrap">
    您现在的位置：<a href="${pageContext.request.contextPath}/index/front">易买网</a> &gt; 在线留言
</div>
<div id="main" class="wrap">
    <div class="lefter">
        <div class="box">
            <h2>商品分类</h2>
            <dl>
                <dt>图书音像</dt>
                <dd><a href="product-list.html">图书</a></dd>
                <dd><a href="product-list.html">音乐</a></dd>
                <dt>百货</dt>
                <dd><a href="product-list.html">运动健康</a></dd>
                <dd><a href="product-list.html">服装</a></dd>
                <dd><a href="product-list.html">家居</a></dd>
                <dd><a href="product-list.html">美妆</a></dd>
                <dd><a href="product-list.html">母婴</a></dd>
                <dd><a href="product-list.html">食品</a></dd>
                <dd><a href="product-list.html">手机数码</a></dd>
                <dd><a href="product-list.html">家具首饰</a></dd>
                <dd><a href="product-list.html">手表饰品</a></dd>
            </dl>
        </div>
        <div class="spacer"></div>
        <div class="last-view">
            <h2>最近浏览</h2>
            <dl class="clearfix">
                <dt><img src="images/product/0_tiny.gif" /></dt>
                <dd><a href="product-view.html">法国德菲丝松露精品巧克力500g/盒</a></dd>
                <dt><img src="images/product/0_tiny.gif" /></dt>
                <dd><a href="product-view.html">法国德菲丝松露精品巧克力500g/盒</a></dd>
            </dl>
        </div>
    </div>
    <div class="main">
        <div class="guestbook">
            <h2>全部留言</h2>
            <ul>
             <c:forEach items="${comments}" var="comment">
                 <li>
                     <dl>
                         <dt>${comment.ecContent}</dt>
                         <dd class="author">网友: ${comment.ecNickName} <span class="timer">${comment.ecCreateTime}</span>
                         <dd>${comment.ecReply}</dd>
                     </dl>
                 </li>
             </c:forEach>
            </ul>
            <div class="clear"></div>
            <div class="pager">
                <ul class="clearfix">
                    <li><a href="${pageContext.request.contextPath}/comment/front/list?page=${curPage>1?curPage-1:1}">上一页</a></li>

                    <c:forEach var="i" begin="${curPage>3?curPage-3:1}" end="${(totalPage-curPage)>3?curPage+3:totalPage}" step="1">
                        <li <c:if test="${i==curPage}">class="current"</c:if> >
                            <a href="${pageContext.request.contextPath}/comment/front/list?page=${i}">${i}</a>
                        </li>


                    </c:forEach>

                    <li><a href="${pageContext.request.contextPath}/comment/front/list?page=${curPage<totalPage?curPage+1:totalPage}">下一页</a></li>

                    <!--必须是model中totalPage的键-->
                    <li><a>共${totalPage}页</a></li>
                </ul>
            </div>
            <div id="reply-box">
                <form id="regForm" action="${pageContext.request.contextPath}/comment/front/save" method="post" onsubmit="return checkForm(this)">
                    <table>
                        <tr>
                            <td class="field">昵称：</td>
                            <td><input class="text" type="text" name="ecNickName" onfocus="FocusItem(this)" onblur="CheckItem(this);"  /><span></span></td>
                        </tr>
                        <tr>
                            <td class="field">留言内容：</td>
                            <td><textarea name="ecContent" onfocus="FocusItem(this)" onblur="CheckItem(this);"></textarea><span></span></td>
                        </tr>
                        <tr>
                            <td class="field"></td>
                            <td><input class="text" type="hidden" name="ecReply" value=""/></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td><label class="ui-blue"><input type="submit" name="submit" value="提交留言"/></label></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
    </div>
    <div class="clear"></div>
</div>
<div id="footer">
    Copyright &copy; 2016 湖南软测信息技术有限公司 All Rights Reserved. 湘ICP证1001号
</div>
</body>
</html>
